/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package gestion_chambes_hotel;

import Main.Login;
import Main.Main;
import java.sql.DriverManager;
import java.sql.SQLException;
import javax.swing.JOptionPane;

/**
 *
 * @author anas
 */
public class Gestion_Chambes_Hotel {

    
        java.sql.Connection conn = null;
    
    public static java.sql.Connection DB_Connection()
    {
    
        try {
            
            Class.forName("com.mysql.jdbc.Driver");
            java.sql.Connection conn =DriverManager.getConnection("jdbc:mysql://localhost:3306/Gestion_Chambres_Hotel", "root", "c56a59f2@");
            //System.out.println("Connected");
            return conn;
            
        } catch (ClassNotFoundException | SQLException e) {
            JOptionPane.showMessageDialog(null,e.getMessage());
        }
    return null;
    }
    
    
     
    public static void main(String[] args) {
        
        
        Login l =new Login();
        l.setVisible(true);
        
    }
    
}
